const express = require('express')
const app = express()

const cm1 = (req,res,next) => {console.log('调用了第一个局部中间件'), next()}
const cm2 = (req,res,next) => {console.log('调用了第二个局部中间件'), next()}
const cm3 = (req,res,next) => {console.log('调用了第三个局部中间件'), next()}
const cm4 = (req,res,next) => {console.log('调用了第四个局部中间件'), next()}

app.get('/',cm1,cm2,(req,res) => {res.send('Holle world')})
app.get('/index',cm3,cm4,(req,res) => {res.send('Holle Fine')})

app.listen(80,()=>{console.log('启动');})